const state = {
    list: [
        {name: "陈科地",age: 22,sex: "男"},
        {name: "聂仔鑫",age: 24,sex: "男"},
        {name: "龙雪",age: 21,sex: "女"},
        {name: "肖雯雯",age: 21,sex: "女"},
    ]
}

const getters = {
    girlList(state) {
        return state.list.filter(v => v.sex == '女')
    }
}

const mutations = {
    add(state,payload) {
        state.list.push(payload);
    }
}

export default {
    namespaced: true,
    state,
    getters,
    mutations
}